package utils

import (
	"crypto/sha256"
	"fmt"
)

var HashSalt = "123456abcdef"

// GetHash 创建 salted hash
func GetHash(s string) string {
	hash := sha256.New()
	hash.Write([]byte(s))
	hash.Write([]byte(HashSalt))
	hashBytes := hash.Sum(nil)
	return fmt.Sprintf("%x", hashBytes)
}
